The 'remove( )' Function function is used to remove a particular value from the Set.
Let us say, we have a Set that contains three names, 'Mohan', 'Kriti' and 'Salim'. And we want to remove 'Kriti' from the Set.
x = {"Mohan", "Kriti", "Salim"} x.remove("Kriti") print(x)
So, in the above code we have created a 'Set' and initialised to the variable 'x'.
Below is how the values are positioned in the Set,
Next, we have used the 'remove( )' function that searches for the name 'Kriti' and removes it from the List.
And we get the below output,